package me.olook.netease.song.rank.biz;

import me.olook.netease.song.rank.dto.FollowersCount;
import me.olook.netease.song.rank.entity.WeiboUser;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Optional;

/**
 * @author zhaohw
 * @date 2018-05-24 9:50
 */
public interface WeiboUserService {

    void save(WeiboUser weiboUser);

    Optional<WeiboUser> findById(String uid);

    Page<WeiboUser> findByPage(Pageable pageable);

    /**
     * 按粉丝数量查询微博用户
     * @param name
     * @param page
     * @param size
     * @return
     */
    Page<WeiboUser> findFansTopUsers(String name , int page ,int size);

    List<String> findDistinctByAddBy();

    List<Object[]> countAddByAndGender(String addBy);

    List<FollowersCount> countFollowersSegment(String addBy);

    List<WeiboUser> findAllByCrtTimeAfter(String name);

    Long countAll();
}
